package com.blb.day1thread;

public class ThreadTest5 {

    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println(Thread.currentThread().getName() + "---" + i);
            }
        });
        thread.setPriority(Thread.MIN_PRIORITY);
        Thread thread2 = new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println(Thread.currentThread().getName() + "---" + i);
            }
        });
        thread2.setPriority(Thread.MAX_PRIORITY);
        thread.start();
        thread2.start();
    }
}
